{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "def gac(g,t):\n",
    "    x=0.5*g*t\n",
    "    return x"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['you', 1]\n",
      "['I', 'his', 1, 'apple']\n",
      "yyyyyyyyyyyy\n",
      "['apple', 1, 'his', 'I']\n"
     ]
    }
   ],
   "source": [
    "a_list=[\"I\",\"give\",\"you\",1,\"apple\"]\n",
    "print(a_list[2:4])\n",
    "a_list[2]='his'\n",
    "a_list.append('yyyyyyyyyyyy')\n",
    "a_list.remove('give')\n",
    "x=a_list.pop()\n",
    "print(a_list)\n",
    "print(x)\n",
    "a_list.reverse()\n",
    "print(a_list)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['The', 'quick', 'brown', 'fox', 'jumps', 'over', 'the', 'lazy', 'dog']\n",
      "The.quick.brown.fox.jumps.over.the.lazy.dog\n"
     ]
    }
   ],
   "source": [
    "line=\"The quick brown fox jumps over the lazy dog\"\n",
    "my_list=line.split(' ')\n",
    "print(my_list)\n",
    "my_list1=list(my_list)\n",
    "line1='.'.join(my_list)\n",
    "print(line1)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Google\n"
     ]
    }
   ],
   "source": [
    "L = [\n",
    "    ['Apple', 'Google', 'Microsoft'],\n",
    "    ['Java', 'Python', 'Ruby', 'PHP'],\n",
    "    ['Adam', 'Bart', 'Lisa']\n",
    "]\n",
    "\n",
    "print(L [0][1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 67,
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid syntax (<ipython-input-67-6085e060e549>, line 15)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-67-6085e060e549>\"\u001b[1;36m, line \u001b[1;32m15\u001b[0m\n\u001b[1;33m    print(my_list[1])\u001b[0m\n\u001b[1;37m    ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
     ]
    }
   ],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "ez game boys\n",
      "['ez', 'game', 'boys']\n"
     ]
    }
   ],
   "source": [
    "Line=input()\n",
    "def f(Line):\n",
    "    a_list=Line.split(\" \")\n",
    "    b=a_list[1]\n",
    "    return a_list\n",
    "print(f(Line))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2\n",
      "10\n"
     ]
    }
   ],
   "source": [
    "a_dict={\"orange\":2,\"apple\":\"one\",\"梨子\":3}\n",
    "print(a_dict['orange'])\n",
    "a_dict['yingtao']=10\n",
    "print(a_dict['yingtao'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 117,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "TCAAGGCATTTGTGGGTTCAATGCGAAAATTGTTATGGATTAAATTATAAGAAATTTAAATTTAATATTTGTGAACAATGTGGATATCATTTGAAAATGAGTACTCAT\n",
      "AGUUCCGUAAACACCCAAGUUACGCUUUUAACAAUACCUAAUUUAAUAUUCUUUAAAUUUAAAUUAUAAACACUUGUUACACCUAUAGUAAACUUUUACUCAUGAGUA\n",
      "['A', 'U', 'G', 'A', 'G', 'U', 'A', 'C', 'U', 'C', 'A', 'U', 'U', 'U', 'U', 'C', 'A', 'A', 'A', 'U', 'G', 'A', 'U', 'A', 'U', 'C', 'C', 'A', 'C', 'A', 'U', 'U', 'G', 'U', 'U', 'C', 'A', 'C', 'A', 'A', 'A', 'U', 'A', 'U', 'U', 'A', 'A', 'A', 'U', 'U', 'U', 'A', 'A', 'A', 'U', 'U', 'U', 'C', 'U', 'U', 'A', 'U', 'A', 'A', 'U', 'U', 'U', 'A', 'A', 'U', 'C', 'C', 'A', 'U', 'A', 'A', 'C', 'A', 'A', 'U', 'U', 'U', 'U', 'C', 'G', 'C', 'A', 'U', 'U', 'G', 'A', 'A', 'C', 'C', 'C', 'A', 'C', 'A', 'A', 'A', 'U', 'G', 'C', 'C', 'U', 'U', 'G', 'A']\n",
      "101\n",
      "85\n",
      "T\n"
     ]
    }
   ],
   "source": [
    "# START_CODE = 'AUG'\n",
    "END_CODE = ('UAA', 'UAG', 'UGA')\n",
    "P_TABLE = {'UUU': 'F', 'CUU': 'L', 'AUU': 'I', 'GUU': 'V', \\\n",
    "                 'UUC': 'F', 'CUC': 'L', 'AUC': 'I', 'GUC': 'V', \\\n",
    "                 'UUA': 'L', 'CUA': 'L', 'AUA': 'I', 'GUA': 'V', \\\n",
    "                 'UUG': 'L', 'CUG': 'L', 'AUG': 'M', 'GUG': 'V', \\\n",
    "                 'UCU': 'S', 'CCU': 'P', 'ACU': 'T', 'GCU': 'A', \\\n",
    "                 'UCC': 'S', 'CCC': 'P', 'ACC': 'T', 'GCC': 'A', \\\n",
    "                 'UCA': 'S', 'CCA': 'P', 'ACA': 'T', 'GCA': 'A', \\\n",
    "                 'UCG': 'S', 'CCG': 'P', 'ACG': 'T', 'GCG': 'A', \\\n",
    "                 'UAU': 'Y', 'CAU': 'H', 'AAU': 'N', 'GAU': 'D', \\\n",
    "                 'UAC': 'Y', 'CAC': 'H', 'AAC': 'N', 'GAC': 'D', \\\n",
    "                 'UAA': '*', 'CAA': 'Q', 'AAA': 'K', 'GAA': 'E', \\\n",
    "                 'UAG': '*', 'CAG': 'Q', 'AAG': 'K', 'GAG': 'E', \\\n",
    "                 'UGU': 'C', 'CGU': 'R', 'AGU': 'S', 'GGU': 'G', \\\n",
    "                 'UGC': 'C', 'CGC': 'R', 'AGC': 'S', 'GGC': 'G', \\\n",
    "                 'UGA': '*', 'CGA': 'R', 'AGA': 'R', 'GGA': 'G', \\\n",
    "                 'UGG': 'W', 'CGG': 'R', 'AGG': 'R', 'GGG': 'G'\n",
    "                 }\n",
    "seq=\"\"\"\n",
    "TCAAGGcATTTGTGGGTTCAATGCgAA\n",
    "aATTGTTATGGATTAAATTATAAGAAA\n",
    "TTTAaaTTTAATAtTTGTGAACAATGT\n",
    "GGATATCATtTGAAAATGAGTACTCAT\n",
    "\"\"\"\n",
    "seq=seq.replace('\\n','' ).upper()\n",
    "print(seq)\n",
    "seq=seq.replace('A','U')\n",
    "seq=seq.replace('T','A')\n",
    "seq=seq.replace('G','x')\n",
    "seq=seq.replace('C','G')\n",
    "seq=seq.replace('x','C')\n",
    "print(seq)\n",
    "seq_list=list(seq)\n",
    "seq_list.reverse()\n",
    "print(seq_list)\n",
    "print(seq.find(START_CODE))\n",
    "print(seq.find(END_CODE[1]))\n",
    "print(P_TABLE[seq[12:15]])\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 119,
   "metadata": {},
   "outputs": [],
   "source": [
    "START_CODE = 'AUG'\n",
    "END_CODE = ('UAA', 'UAG', 'UGA')\n",
    "P_TABLE = {'UUU': 'F', 'CUU': 'L', 'AUU': 'I', 'GUU': 'V', \\\n",
    "                 'UUC': 'F', 'CUC': 'L', 'AUC': 'I', 'GUC': 'V', \\\n",
    "                 'UUA': 'L', 'CUA': 'L', 'AUA': 'I', 'GUA': 'V', \\\n",
    "                 'UUG': 'L', 'CUG': 'L', 'AUG': 'M', 'GUG': 'V', \\\n",
    "                 'UCU': 'S', 'CCU': 'P', 'ACU': 'T', 'GCU': 'A', \\\n",
    "                 'UCC': 'S', 'CCC': 'P', 'ACC': 'T', 'GCC': 'A', \\\n",
    "                 'UCA': 'S', 'CCA': 'P', 'ACA': 'T', 'GCA': 'A', \\\n",
    "                 'UCG': 'S', 'CCG': 'P', 'ACG': 'T', 'GCG': 'A', \\\n",
    "                 'UAU': 'Y', 'CAU': 'H', 'AAU': 'N', 'GAU': 'D', \\\n",
    "                 'UAC': 'Y', 'CAC': 'H', 'AAC': 'N', 'GAC': 'D', \\\n",
    "                 'UAA': '*', 'CAA': 'Q', 'AAA': 'K', 'GAA': 'E', \\\n",
    "                 'UAG': '*', 'CAG': 'Q', 'AAG': 'K', 'GAG': 'E', \\\n",
    "                 'UGU': 'C', 'CGU': 'R', 'AGU': 'S', 'GGU': 'G', \\\n",
    "                 'UGC': 'C', 'CGC': 'R', 'AGC': 'S', 'GGC': 'G', \\\n",
    "                 'UGA': '*', 'CGA': 'R', 'AGA': 'R', 'GGA': 'G', \\\n",
    "                 'UGG': 'W', 'CGG': 'R', 'AGG': 'R', 'GGG': 'G'\n",
    "                 }\n",
    "seq=\"\"\"\n",
    "TCAAGGcATTTGTGGGTTCAATGCgAA\n",
    "aATTGTTATGGATTAAATTATAAGAAA\n",
    "TTTAaaTTTAATAtTTGTGAACAATGT\n",
    "GGATATCATtTGAAAATGAGTACTCAT\n",
    "\"\"\"\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 127,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "9"
      ]
     },
     "execution_count": 127,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "1*9\n",
    "\n",
    "\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 132,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "!!!!\n",
      "end\n"
     ]
    }
   ],
   "source": [
    "age=99\n",
    "if(age<18):\n",
    "    print('kid')\n",
    "elif(age<30):\n",
    "    print('123')\n",
    "else:\n",
    "    print('!!!!')\n",
    "\n",
    "print('end')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 141,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "True\n"
     ]
    }
   ],
   "source": [
    "a=False\n",
    "b=True\n",
    "print(b)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "a=float(input('number'))\n",
    "if a>0:\n",
    "    print('大于零')\n",
    "elif a<0:\n",
    "    print('小于零')\n",
    "    \n",
    "else:\n",
    "    print('等于零')\n",
    "    \n",
    "    \n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
